package com.nut.mapper;

import com.nut.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-04-20 20:08
 * @ Description : User持久层接口
 */

@Repository
public interface UserMapper
{
    //查询所有User
    List<User> findAll();

    //添加User
    void add(User user);

    //删除User
    void delete(int id);

    //更新User
    void update(User user);

    //分页查询
    List<User> findByPage(@Param("start")Integer start,@Param("rows")Integer rows);

    //查询总条数
    Long findTotals();

    //根据id查询User
    User query(int id);
}
